package com.baturu.vin.gm.dal.dao;

import com.baturu.vin.gm.dto.ReplaceCodeDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

public interface GeneralMotorsReplaceCodeDAO {

    @Select("<script>" +
            "SELECT id,partsCode,replaceCodes " +
            "FROM gm_parts_replacecode " +
            "WHERE partsCode in " +
            "<foreach collection='partsCodes' item='item' index='index' open='(' separator=',' close=')' >" +
            "#{item}" +
            "</foreach>" +
            "</script>")
    List<ReplaceCodeDTO> queryGeneralMotorsReplaceCode(@Param("partsCodes") Set<String> partsCodes);
}
